package enumerated;

/**
 * @author 杨宇
 * @version 1.0 2017/1/16.
 */
public class UpcastEnum {
    public static void main(String[] args) {
        Search[] vals = Search.values();
        Enum e = Search.HITHER; // Upcast
        // e.values(); // No values() in Enum
        for (Enum en : e.getClass().getEnumConstants())
            System.out.println(en);
    }
}

enum Search {HITHER, YON}